{% extends "user/layout.njk" %}

{% block css %}
  <link rel='stylesheet' href='/user/css/fragment.css'/>
{% endblock %}

{% block main %}
  <div class="wrap">
    <section>
      <ul>
        {% for item in data.blogs %}
          <li>
            <a class="post-href" href="/post/{{item.blogId}}">
              <h2>{{ item.title }}</h2>
              <div>{{ item.htmlContent | safe }}</div>
            </a>
          </li>
        {% endfor %}
      </ul>
    </section>
    <div class="tool-bar">
      {% if data.previous %}
        <a href="{{data.previous}}">上一页</a>
      {% endif %}
      {% if data.next %}
        <a href="{{data.next}}">下一页</a>
      {% endif %}
    </div>
  </div>
{% endblock %}